Request

Undocumented in source.
final
class Request : RequestHandler {}

Constructors

this
this(CreatorBuffer cuffer, DoHandler handler, uint maxsize)
Undocumented in source.

Members

Functions

addMate
void addMate(string key, string value)
Undocumented in source. Be warned that the author may not have intended to support it.
createResponse
Response createResponse()
Undocumented in source. Be warned that the author may not have intended to support it.
file
auto file(string key)

GET FILE , if return NULL , file is null

get
T get(string key, T v)

get a query

getCookieValue
string getCookieValue(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
getMate
string getMate(string key, string value)
Undocumented in source. Be warned that the author may not have intended to support it.
getSession
Session getSession(string sessionName)
Undocumented in source. Be warned that the author may not have intended to support it.
header
string header(HTTPHeaderCode code)
Undocumented in source. Be warned that the author may not have intended to support it.
header
string header(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
headerExists
bool headerExists(HTTPHeaderCode code)
Undocumented in source. Be warned that the author may not have intended to support it.
headerExists
bool headerExists(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
headerValueForeach
bool headerValueForeach(string name, bool delegate(string value) func)
Undocumented in source. Be warned that the author may not have intended to support it.
headerValueForeach
bool headerValueForeach(HTTPHeaderCode code, bool delegate(string value) func)
Undocumented in source. Be warned that the author may not have intended to support it.
headersForeach
int headersForeach(int delegate(string key, string value) each)
Undocumented in source. Be warned that the author may not have intended to support it.
headersForeach
int headersForeach(int delegate(HTTPHeaderCode code, string key, string value) each)
Undocumented in source. Be warned that the author may not have intended to support it.
json
auto json(string key)
Undocumented in source. Be warned that the author may not have intended to support it.
onBody
void onBody(ubyte[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
onEOM
void onEOM()
Undocumented in source. Be warned that the author may not have intended to support it.
onError
void onError(HTTPErrorCode code)
Undocumented in source. Be warned that the author may not have intended to support it.
onResquest
void onResquest(HTTPMessage headers)
Undocumented in source. Be warned that the author may not have intended to support it.
post
T post(string key, T v)

get a post

requestComplete
void requestComplete()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

Body
Buffer Body [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
Header
HTTPMessage Header [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
action
string action [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
action
string action [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
clientAddress
Address clientAddress [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
clientIp
string clientIp [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
cookies
Cookie[string] cookies [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
host
string host [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
json
JSONValue json [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
mate
string[string] mate [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
materef
string[string] materef [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
method
string method [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
path
string path [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
postForm
HTTPForm postForm [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
queries
string[string] queries [@property getter]

get queries

referer
string referer [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
route
Route route [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
route
Route route [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
ubyteBody
ubyte[] ubyteBody [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
user
User user [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
user
User user [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From RequestHandler

setResponseHandler
void setResponseHandler(ResponseHandler handler)
Undocumented in source. Be warned that the author may not have intended to support it.
responseHandler
ResponseHandler responseHandler [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
onRequest
void onRequest(HttpMessage headers)

Invoked when we have successfully fetched headers from client. This will always be the first callback invoked on your handler.

onResquest
void onResquest(HttpMessage headers)

deprecated("Incorrect spelling. Using onRequest instead.")

onBody
void onBody(ubyte[] data)

Invoked when we get part of body for the request.

onEOM
void onEOM()

Invoked when we finish receiving the body.

requestComplete
void requestComplete()

Invoked when request processing has been completed and nothing more needs to be done. This may be a good place to log some stats and clean up resources. This is distinct from onEOM() because it is invoked after the response is fully sent. Once this callback has been received, downstream_ should be considered invalid.

onError
void onError(HTTPErrorCode code)

Request failed. Maybe because of read/write error on socket or client not being able to send request in time.

onFrame
void onFrame(WSFrame frame)
Undocumented in source. Be warned that the author may not have intended to support it.
onUpgtade
bool onUpgtade(CodecProtocol protocol, HttpMessage msg)
Undocumented in source. Be warned that the author may not have intended to support it.
_downstream
ResponseHandler _downstream;
Undocumented in source.

Meta